package com.dongge.Entity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhudong on 2016/7/6.
 */
public class MyList {
    private List<String> names;

    public List<String> getNames() {
        return names;
    }

    public void setNames(List<String> names) {
        this.names = names;
    }

    public void setName(String name){
        if(names == null){
            names = new ArrayList<String>();
            names.add(name);
        }
    }

    public void print(){
        for(String str:names){
            System.out.println(str);
        }
    }

}
